const border = require('../tw-lib-base/border/props')
const padding = require('../tw-lib-base/padding/props')

module.exports = {
  value: {
    type: [Boolean, String, Number],
    default: '',
    name: '选中标签名称',
    filedType: 'value',
    dataSource: {
      from: 'tabs',
      type: 'array',
      labelKey: 'label',
      valueKey: 'value'
    }
  },
  navs: {
    type: Array,
    default () {
      return [
        {
          label: '标签一',
          iconCss: 'x24 xrpdf',
          value: '1'
        },
        {
          label: '标签二',
          imgUrl: 'sss',
          value: '2'
        },
        {
          label: '链接示例',
          value: '3',
          href: './demo'
        },
        {
          label: '示例',
          value: '3',
          anchor: 'id'
        },
        {
          label: '权限链接',
          value: '3',
          href: './demo',
          roles: ['1000000002']
        }
      ]
    },
    name: '标签列表',
    nameTip: '数据项中指定href属性，该标签会成为一个链接，指定anchor属性，该标签会成为一个定位锚点，anchor属性请与组件的id名称配合使用',
    filedType: 'api'
  },

  type: {
    type: String,
    default: 'top',
    name: '图标位置',
    filedType: 'select',
    options: [
      {
        name: '不显示',
        value: 'none'
      },
      {
        name: '顶部',
        value: 'top'
      },
      {
        name: '左侧',
        value: 'left'
      }
    ]
  },

  width: {
    type: String,
    default: '80px',
    name: '菜单宽度',
    filedType: 'string'
  },

  background: {
    type: String,
    default: '#f7f8fa',
    name: '菜单栏背景色',
    filedType: 'color'
  },

  navColor: {
    type: String,
    default: '#323233',
    name: '菜单字体颜色',
    filedType: 'color'
  },
  navFontSize: {
    type: String,
    default: '14px',
    name: '菜单字体大小',
    filedType: 'string'
  },
  navBgColor: {
    type: String,
    default: '#f7f8fa',
    name: '菜单未选中背景色',
    filedType: 'color'
  },
  textAlign: {
    type: String,
    default: 'center',
    name: '字体居中',
    filedType: 'select',
    options: [
      {
        name: '居左',
        value: 'left'
      },
      {
        name: '居中',
        value: 'center'
      },
      {
        name: '居右',
        value: 'right'
      }
    ]
  },
  padding: {
    type: String,
    default: '20px 12px',
    name: '字体内边距',
    filedType: 'string'
  },

  lineHeight: {
    type: String,
    default: '20px',
    name: '字体行高',
    filedType: 'string'
  },

  activeBg: {
    type: String,
    default: '#fff',
    name: '选中背景颜色',
    filedType: 'color'
  },

  activeColor: {
    type: String,
    default: '#323233',
    name: '选中字体颜色',
    filedType: 'color'
  },
  iconWidth: {
    type: String,
    default: '60px',
    name: '图标宽度',
    nameTip: '数据项中指定imgUrl属性时使用',
    filedType: 'string'
  },
  rightDiv: {
    type: Boolean,
    default: false,
    name: '右侧布局',
    nameTip: '可拖动组件到右侧布局块',
    filedType: 'switch'
  },

  rightwidth: {
    type: String,
    default: '100%',
    name: '内容区宽度',
    filedType: 'string'
  },

  medialPoint: {
    type: String,
    default: '',
    name: '媒体查询断点',
    nameTip: '不需要响应多种分辨率时不需要设置',
    filedType: 'string'
  },

  medialPointWidth: {
    type: String,
    default: '',
    name: '小于媒体查询断点时，内容区宽度',
    filedType: 'string'
  },

  insideBgColor: {
    type: String,
    default: '#ffffff',
    name: '内容区背景色',
    filedType: 'color'
  },

  insideBgImage: {
    type: Array,
    default () {
      return []
    },
    name: '内部容器背景图片',
    filedType: 'file',
    limit: 1,
    maxSize: 1024
  },

  insideGradientColor1: {
    type: String,
    default: '',
    name: '内容区渐变色1',
    filedType: 'color'
  },

  insideGradientColor2: {
    type: String,
    default: '',
    name: '内容区渐变色2',
    filedType: 'color'
  },

  insideGradientDeg: {
    type: String,
    default: '90',
    name: '内容区渐变角度',
    filedType: 'color'
  },

  insideBgAlign: {
    type: String,
    default: 'center',
    name: '内容区背景图片对齐方式',
    filedType: 'select',
    options: [
      {
        name: '左对齐',
        value: 'left'
      },
      {
        name: '居中',
        value: 'center'
      },
      {
        name: '右对齐',
        value: 'right'
      }
    ]
  },

  insideBackgroundSize: {
    type: String,
    default: 'auto',
    name: '内容区背景图片填充方式',
    filedType: 'select',
    options: [
      {
        name: '自动',
        value: 'auto'
      },
      {
        name: '覆盖',
        value: 'cover'
      },
      {
        name: '适应',
        value: 'contain'
      }
    ]
  },

  insideBgPosition: {
    type: String,
    default: 'padding-box',
    name: '内容区背景位于',
    filedType: 'select',
    options: [
      {
        name: '边框内',
        value: 'border-box'
      },
      {
        name: '内边距内',
        value: 'padding-box'
      },
      {
        name: '内容区内',
        value: 'content-box'
      }
    ]
  },

  paddingTop: {
    type: String,
    default: '0px',
    name: '内边距(上)',
    filedType: 'string'
  },

  paddingBottom: {
    type: String,
    default: '0px',
    name: '内边距(下)',
    filedType: 'string'
  },

  paddingLeft: {
    type: String,
    default: '0px',
    name: '内边距(左)',
    filedType: 'string'
  },

  paddingRight: {
    type: String,
    default: '0px',
    name: '内边距(右)',
    filedType: 'string'
  },

  shadowColor: {
    type: String,
    default: '',
    name: '内容区投影色',
    filedType: 'color'
  },

  radius: {
    type: String,
    default: '0',
    name: '内容区圆角',
    filedType: 'string'
  },

  defaultIndex: {
    type: String,
    default: '0',
    name: '默认激活第几个',
    filedType: 'string'
  },

  ...border,
}
